package cn.xueden.system.service;

import cn.xueden.common.result.Result;
import cn.xueden.system.model.form.LoginForm;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**功能描述：登录服务
 * @author:梁志杰
 * @date:2025/6/8
 * @description:cn.xueden.system.service
 * @version:1.0
 */
public interface IAuthService {

    /**
     * 登录
     * @param request
     * @param loginForm
     * @return
     */
    Result<String> login(HttpServletRequest request, LoginForm loginForm);

    /**
     * 获取图片验证码
     *
     * @param request  request对象，获取sessionId
     * @param response response对象，响应图片
     */
    void getCaptcha(HttpServletRequest request, HttpServletResponse response);

    /**
     * 校验验证码
     *
     * @param request request对象获取sessionId
     * @param code    用户输入的验证码
     * @return 响应结果
     */
    Result<String> verifyCode(HttpServletRequest request, String code);

    /**
     * 发送心跳包
     * @param request
     * @return
     */
    Result<String> sendHeartbeat(HttpServletRequest request);



}
